feat(outbound): add token/api-key upload and connection-status list methods#754
Conversation
…ethods
Wrap the outbound-application management REST endpoints that the SDK didn't expose,
on management.outboundApplication:
- uploadUserApiKey / uploadTenantApiKey (apikey-type apps)
- uploadUserToken / uploadTenantToken + batchUpload{User,Tenant}Tokens (oauth-type migration)
- listAppsWithUserToken (connection-status read, replaces N fetchToken calls)
Closes descope/etc#16568
Closes descope/etc#16569
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
🐕 Review complete — View session on Shuni Portal 🐾 |
🐕 Suggested ReviewersThe review assignment prioritizes recent contributors to the affected files, covering different parts of the update such as core logic, testing, and path management, to ensure comprehensive review coverage.
Suggested by Shuni based on git history and PR context. Names are not @-mentioned to avoid notifying anyone — request a review from whoever fits best. |
There was a problem hiding this comment.
🐕 Shuni's Review
Wraps the existing outbound-application management REST endpoints (token/api-key upload, batch migrate, connection-status list) as new management.outboundApplication SDK methods.
No issues found — good bones! New methods mirror the existing transformResponse/apiPaths patterns exactly, tests assert the correct path + payload for each, and the new types are consistent. Woof!
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Related Issues
Fixes descope/etc#16568
Fixes descope/etc#16569
(Upstream SDK issues: #748, #749)
Description
The outbound-application management REST API already ships these endpoints, but the Node SDK didn't wrap them. This adds them to
management.outboundApplication:Upload / migrate credentials (#748 / descope/etc#16568)
uploadUserApiKey(appId, userId, apiKey, tenantId?)/uploadTenantApiKey(appId, tenantId, apiKey)— store a static API key on an apikey-type appuploadUserToken(token)/uploadTenantToken(token)— migrate an existing OAuth token without re-running the flowbatchUploadUserTokens(tokens)/batchUploadTenantTokens(tokens)— all-or-nothing batch (returns per-itemfailures)Connection-status read (#749 / descope/etc#16569)
listAppsWithUserToken(userId, tenantId?)— the app IDs a user holds a valid token for; replaces callingfetchTokenonce per app and sniffing theE111504not-found codeRequest payloads were verified field-for-field against the backend proto messages (API-key field is
apiKey;verifyRefreshis single-upload only).Must
outboundapplication.test.ts)🤖 Generated with Claude Code